package com.huangmb.anymark.server.dto;

import com.huangmb.anymark.server.model.Category;
import com.huangmb.anymark.server.model.Marker;
import com.huangmb.anymark.server.model.User;

/**
 * @author hmb
 * @version 1.0
 * @since 2016/5/21 16:32
 */
public class MarkerDto {
    private int id;
    private String mTitle;
    private String mInfo;
    private String mCoverImage;
    private String mCategory;
    private int mCreateTime;
    private double mLatitude;
    private double mLongitude;
    private String mAddress;
    private String mUser;

    public MarkerDto(){

    }
    public MarkerDto(Marker marker){
        this.id = marker.getId();
        this.mTitle = marker.getTitle();
        this.mInfo = marker.getInfo();
        this.mCoverImage = marker.getCoverImage();
        this.mCategory = marker.getCategory().getName();
        this.mCreateTime = marker.getCreateTime();
        this.mLatitude = marker.getLatitude();
        this.mLongitude = marker.getLongitude();
        this.mAddress = marker.getAddress();
        this.mUser = marker.getUser().getName();
    }
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTitle() {
        return mTitle;
    }

    public void setTitle(String title) {
        mTitle = title;
    }

    public String getInfo() {
        return mInfo;
    }

    public void setInfo(String info) {
        mInfo = info;
    }

    public String getCoverImage() {
        return mCoverImage;
    }

    public void setCoverImage(String coverImage) {
        mCoverImage = coverImage;
    }

    public String getCategory() {
        return mCategory;
    }

    public void setCategory(String category) {
        mCategory = category;
    }

    public int getCreateTime() {
        return mCreateTime;
    }

    public void setCreateTime(int createTime) {
        mCreateTime = createTime;
    }

    public double getLatitude() {
        return mLatitude;
    }

    public void setLatitude(double latitude) {
        mLatitude = latitude;
    }

    public double getLongitude() {
        return mLongitude;
    }

    public void setLongitude(double longitude) {
        mLongitude = longitude;
    }

    public String getAddress() {
        return mAddress;
    }

    public void setAddress(String address) {
        mAddress = address;
    }

    public String getUser() {
        return mUser;
    }

    public void setUser(String user) {
        mUser = user;
    }
}
